<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<title>the first our youtube movies</title>
<head>
    <link href="<?php echo base_url(); ?>css/admincp.css" type="text/css" rel="stylesheet" />
	<!-- jQuery library - I get it from Google API's -->
	<script src="<?php echo base_url(); ?>script/jquery-1.6.2.min.js" type="text/javascript"></script>
    <script src="<?php echo base_url(); ?>script/jfunc.js" type="text/javascript"></script>
        <title>
        </title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <script type="text/javascript">
        function keypress(e){
        //Ham dung de ngan nguoi dung nhap cac ky tu khac ky tu so vao textbox
            var keypressed = null;
            if (window.event){
            keypressed = window.event.keyCode; //IE
            }else{
                keypressed = e.which; //NON-IE, Standard
            }if (keypressed < 48 || keypressed > 57){
                //CharCode cua 0 la 48(theo bang ma ASCII)
                //Charcode cua 9 là 57 (theo bang ma ASCII)
                if (keypressed == 8 || keypressed == 127){//Phim Del và Back
                    return;
                }
                return false;
            }
        }
    </script>
</head>
<body id="video">
<!--------------------------------------- content------------------------>
<div id="content">
    <span class="update_title">Cập nhật thông tin</span><br/>
    <div class="content">
        <form method="post" enctype="multipart/form-data" name="movieupdate" action="">
            <input type="hidden" name="id" value="<?php echo $movieID; ?>">
            <table>
                <tr>
                    <td colspan="3">
                        <!-- ten film -->
                        <label for="intput_movie_name" class="video-name">Tên video</label><label class="lable-input"><input class="input-name-vd" type="text" size="84" name="txt_name" value="<?php echo
        $movieInfo['movie_name']; ?>" /></label>
                    </td>
                </tr>
                <tr>
                    <td rowspan="8" class="img">
                        <!-- hinh anh -->
                        <label for="intput_image"></label>
                        <label class="update-img"><img src="<?php echo base_url() . $movieInfo['movie_image']; ?>"/></label>
                    </td>
                    <td class="td">
                        <label for="intput_image">Thay hình đại diện</label>
                    </td>
                    <td>
                        <input type="file" name="imagefile" id="image_file" />
                    </td>
                </tr>
                <tr>
                    <td class="td">
                        <!-- theloai -->
                        <label for="intput_movie_category">Thể Loại</label>
                    </td>
                    <td>
                        <!-- category -->
                        <select class="input" name="cbx_category" id="cbx_category"">
                        <?php
                        foreach($categoryList as $category):
                            if($category['movie_category_id'] != $movieInfo['category_id'])
                                echo "<option value='" . $category['movie_category_id']. "'>" . $category['name'] . "</option>";
                            else
                                echo "<option value='" . $category['movie_category_id']. "' selected=\"selected\">" . $category['name'] . "</option>";
                        endforeach;
                        ?>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="td">
                        <label for="intput_year">Năm phát hành: </label>
                    </td>
                    <td>
                        <input class="input" type="text" name="txt_year" onkeypress="return keypress(event);" value="<?php echo $movieInfo['movie_year']; ?>" />
                    </td>
                </tr>
                <tr>
                    <td class="td">
                        <!-- dien vien -->
                        <label for="intput_actors">Diễn viên: </label>
                    </td>
                    <td>
                        <input class="input" type="text" name="txt_actors" value="<?php echo $movieInfo['movie_actors']; ?>" />
                    </td>
                </tr>
                <tr>
                    <td class="td">
                        <!-- luot xem -->
                        <label for="intput_views">Lượt xem: </label>
                    </td>
                    <td>
                        <?php echo $movieInfo['movie_views']; ?>
                    </td>
                </tr>
                <tr>
                    <td class="td"><label for="intput_date">Ngày nhập: </label></td>
                    <td>
                        <?php echo $movieInfo['movie_date']; ?>
                    </td>
                </tr>
                <tr>
                    <td class="td">&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td class="td">&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td colspan="3">
                        <!-- gioi thieu -->
                        <label for="intput_movie_content" class="new-title-input">Nội dung chính:</label>
                            <p><textarea rows="10" cols="80" name="main_content"><?php echo $movieInfo['movie_main_content'];?></textarea></p>
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <!-- gioi thieu -->
                        <label for="intput_movie_introduction" class="info-title">Thông tin:</label>
                        <textarea name="introduction" id="introduction"><?php echo $movieInfo['movie_introduction']; ?></textarea>
                        <?php echo $editor; ?>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <input type="submit" name="update-submit" id="submitForm" value="Cập Nhật" style="cursor: pointer;"/>
                    </td>
                </tr>
            </table>
        </form>
    </div>
    <iframe width="800px" height="400" style="border: none;" src="<?php echo base_url(); ?>admincp/movie/episode/home/<?php echo $movieID; ?>.html"></iframe>
</div><!---------- end content-------->
</body>
</html>